package muster;

/**
 * @author:Administrator
 * @date:2022/1/20
 * @describe:
 */
public class Fruit {
    public String name;
    public double price;

    public Fruit(String name, double price) {
        this.name = name;
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "水果{" +
                "名称='" + name + '\'' +
                ", 价格=" + price +
                "斤/元" + '}';
    }
}
